package com.euond.permission.entities;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.euond.common.core.entities.BaseEditEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 资源表
 */
@Getter
@Setter
@TableName(value = "sys_resource")
public class Resource extends BaseEditEntity {

    /**
     * 名称
     */
    @Size(min = 4, max = 64)
    @NotNull
    private String name;

    /**
     * 地址
     */
    @Size(min = 4, max = 64)
    @NotNull
    private String url;

    /**
     * 图标
     */
    @Size(min = 1, max = 64)
    private String icon;

    /**
     * 权限值
     */
    @NotNull
    private Integer PermissionVal;

    /**
     * 状态
     */
    @NotNull
    private Integer status;

    /**
     * 是否菜单项
     */
    private Integer ifMenu;

    /**
     * 权限值明细
     */
    @TableField(exist=false)
    private List<ResourcePermission> permissionList;
}
